<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width initial-sacle=1.0">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="../publish/font-awesome-4.7.0/css/font-awesome.css"/>
    <link rel="stylesheet" type="text/css" href="../publish/bootstrap4/dist/css/bootstrap.css"/>
    <link rel="stylesheet" href="http://localhost:3031/publish/css/edit.css">
    <title></title>
    <script type="text/javascript" src="http://localhost:3031/publish/js/jquery-3.5.1.slim.min.js"></script>
    <script type="text/javascript" src="http://localhost:3031/publish/bootstrap4/dist/js/bootstrap.bundle.js"></script>
    <script type="text/javascript" src="http://localhost:3031/publish/bootstrap4/dist/js/bootstrap.js"></script>


</head>
<body>
<div class="container-fluid" style="background-color: #64868b;line-height: 50px;">
    <ol class="d-flex flex-row">
        <li>
            <h5 class="text-white pr-5 g_line">欢迎进入新闻管理系统网站</h5>
        </li>
        <form action="" method="post" enctype="application/x-www-form-urlencoded">
            <li class="li_br px-3" >
                <span style="border-radius: 25px;"><img src="http://localhost:3031/publish/images/logins.png" alt="" width="40px" height="40px"></span>
                <span class="text-white" style="line-height: 55px">admin</span><i class="fa fa-caret-down text-white pl-2"></i>
            </li>
        </form>
        <li class="ml-auto text-white mr-5 px-3 li_br"  >
            <span>网站首页</span>
        </li>
    </ol>
</div>
<div class="container-fluid text-white m-0">
    <ul class="row">
        <li class="col-2 li_p">
            <div id="example" class="w-75">
                <ul class="card border-0 p-0 rounded-0 bg_div2">
                    <li class="card-header p-0">
                        <a class="btn btn-link w-100 text-left text-black-50 btn_txt py-3" data-toggle="collapse" data-target="#one">管理员设置
                            <span class="out"></span>
                        </a>
                        <div class="card-body collapse show border-0 p-0" id="one" data-parent="#example">
                            <div class="d-flex flex-column mr-auto">
                                <a href="/admin" class=" btn_bg">管理员列表</a>
                                <a href="#" class=" btn_bg">角色列表</a>
                            </div>

                        </div>
                    </li>
                    <li class="card-header p-0">
                        <button class="btn btn-link w-100 text-left text-black-50 btn_txt py-3" data-toggle="collapse" data-target="#two" >新闻设置
                            <span class="out"></span>
                        </button>
                        <div class="card-body collapse show border-0 p-0" id="two" data-parent="#example">
                            <div class="d-flex flex-column mr-auto">
                                <a href="#" class=" btn_bg">新闻类型</a>
                                <a href="/add" class=" btn_bg active">新闻列表</a>
                            </div>

                        </div>
                    </li>
                </ul>
            </div>
        </li>
        <li class="col-10">
            <form action="/edit/<%= result[0].id%>" class="overflow-hidden mt-4" method="post" enctype="application/x-www-form-urlencoded">
                <table class="table">
                    <tr class="card border-0  d-flex flex-row">
                        <td class="border-top-0 card-header h-50">文章类型</td>
                        <td class="border-top-0 card-body">
                            <select class="form-control" name="cengar">
                                <option <% if(result[0].cengar == 1) { %>selected<%}%> value="1" class="form-control">最新资讯</option>
                                <option <% if(result[0].cengar == 2) { %>selected<%}%>  value="2" class="form-control">产品新闻</option>
                                <option <% if(result[0].cengar == 3) { %>selected<%}%> value="3" class="form-control">公司资讯</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="card border-0 d-flex flex-row">
                        <td class="border-top-0 card-header h-50">文章标题</td>
                        <td class="border-top-0 card-body"><input type="text" placeholder="请输入文章标题" class="form-control" name="title" value="<%=result[0].title%>"></td>
                    </tr>
                    <tr class="card border-0 d-flex flex-row">
                        <td class="border-top-0 card-header h-50">文章作者</td>
                        <td class="border-top-0 card-body">
                            <input type="text" name="author" placeholder="请输入文章作者" class="form-control" value="<%=result[0].author%>">
                        </td>
                    </tr>
                    <tr class="card border-0 d-flex flex-row">
                        <td class="border-top-0 card-header h-50">文章来源</td>
                        <td class="border-top-0 card-body">
                            <input type="text" name="url" placeholder="请输入文章来源" class="form-control" value="<%=result[0].url%>">
                        </td>
                    </tr>
                    <tr class="card border-0 d-flex flex-column">
                        <td class="border-top-0 card-header">文章摘要</td>
                        <td class="border-top-0 card-body">
									<textarea rows="5" cols="8" class="w-100" name="texts">
                                            <%=result[0].texts%>
									</textarea>
                        </td>
                    </tr>
                    <tr class="card border-0 d-flex flex-column">
                        <td class="border-top-0 card-header">文章内容</td>
                        <td class="border-top-0 card-body">
									<textarea rows="5" cols="8" class="w-100" name="content">
                                      <%=result[0].content%>
									</textarea>
                        </td>
                    </tr>

                    <tr class="card border-0 d-flex flex-row">
                        <td class="border-top-0 card-header">文章属性</td>
                        <td class="card-body border-top-0 d-flex flex-row">
                            <input type="radio" name="top" value="0" class="" <% if(result[0].top == 0) { %>checked<%}%>>置顶
                            <input type="radio" name="top" value="1" class=" ml-5" <% if(result[0].top == 1) { %>checked<%}%>>不置顶
                        </td>
                    </tr>
                    <tr class="card border-0 d-flex flex-row">
                        <td class="border-top-0 card-header">文章属性</td>
                        <td class="card-body border-top-0 d-flex flex-row">
                            <input type="radio" value="0" name="status" class="" <% if(result[0].status == 0) { %>checked<%}%>>可见
                            <input type="radio" value="1" name="status" class=" ml-5" <% if(result[0].status == 1) { %>checked<%}%>>不可见
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="submit" class="w-100 btn btn-primary">
                        </td>
                    </tr>
                </table>
            </form>

        </li>

    </ul>

</div>
</body>
</html>

<script type="text/javascript" src="http://localhost:3031/publish/js/index.js"></script>
